package com.woniu.zsd.shopping.service;

import com.woniu.zsd.common.web.PageInfo;
import com.woniu.zsd.shopping.dto.SelectAllProductDto;
import com.woniu.zsd.shopping.dto.SelectCollectProductDto;
import com.woniu.zsd.shopping.model.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.zsd.shopping.param.AddProductParam;
import com.woniu.zsd.shopping.param.PageParam;
import com.woniu.zsd.shopping.param.SelectProductParam;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhangtao
 * @since 2025年02月18日
 */
public interface ProductService extends IService<Product> {

    void addProduct(AddProductParam param) throws Exception;

    void deleteProduct(Integer productId) throws Exception;

    PageInfo selectAllProduct(SelectProductParam param) throws Exception;

    void addProductStock(Integer productId, Integer stockNum) throws Exception;

    void updateProductPoint(Integer productId, Integer point) throws Exception;

    void updateProductStatus(Integer productId, String status) throws Exception;

    void collectProduct(Integer productId, Integer userId) throws Exception;

    void cancelCollectProduct(Integer productId, Integer userId) throws Exception;

    PageInfo selectCollectProduct(PageParam param, Integer userId) throws Exception;

    List<SelectCollectProductDto> selectTopTenProduct() throws Exception;
}
